package zaphod.toy.gef.japanexample.model;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;


public abstract class AbstractModel
{
    private PropertyChangeSupport listeners = new PropertyChangeSupport( this );


    public void addPropertyChangeListener( PropertyChangeListener listener )
    {
        listeners.addPropertyChangeListener( listener );
    }


    public void firePropertyChange( String propertyName, Object oldValue,
            Object newValue )
    {
        listeners.firePropertyChange( propertyName, oldValue, newValue );
    }


    public void removePropertyChangeListner( PropertyChangeListener listener )
    {
        listeners.removePropertyChangeListener( listener );
    }

}
